package com.xuecheng.content.api;

import com.xuecheng.content.service.CourseCategoryService;
import com.xuecheng.model.dto.CourseCategoryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Tim Hooper
 * @version 1.0
 * @time 2023/01/31/21:04
 */
@Api(value = "课程分类管理接口", tags = "课程分类管理接口")
@RestController
public class CourseCategoryController {

    @Resource
    private CourseCategoryService courseCategoryService;

    @ApiOperation("课程分类查询接口")
    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryDto> list() {
        return courseCategoryService.getCategoryList();
    }
}
